/**
 * 作业：创建100个文件，然后拼接这100个文件的字符串
 */
let fs=require("fs")
for(let i=0;i<100;i++){
     let fileName='./files/demo'+i+'.txt';
     fs.writeFileSync(fileName,Math.round(Math.random()*100));
}
let totalStr='';
let arrs=[];
for(let j=0;j<100;j++){
    let fileName='./files/demo'+j+'.txt';
    let bf2=fs.readFileSync(fileName);
    totalStr=totalStr+bf2.toString();
    arrs.push(bf2.toString());
}
console.log(totalStr);
console.log(arrs.join(''));

